﻿#include "MaterialIsotropicSolidsWapper.h"
#include "FITK_Kernel/FITKAppFramework/FITKMessage.h"

IsotropicSolids * MaterialIsotropicSolidsWapper::new_IsotropicSolids()
{
    return new IsotropicSolids;
}

void MaterialIsotropicSolidsWapper::delete_IsotropicSolids(IsotropicSolids * obj)
{
    if (obj) delete obj;
}

IsotropicSolids * MaterialIsotropicSolidsWapper::static_IsotropicSolids_GetIsotropicSolids(const QString& name)
{
    return new IsotropicSolids(name);
}

QString MaterialIsotropicSolidsWapper::getName(IsotropicSolids * obj)
{
    if (obj)
        return obj->getName();
    return QString();
}

void MaterialIsotropicSolidsWapper::setName(IsotropicSolids * obj, const QString & name)
{
    if (!obj)return;
    bool ok = obj->setName(name);
    if (!ok) {
        AppFrame::FITKMessageError("Set Name failed !");
    }
}


void MaterialIsotropicSolidsWapper::setIsotropicSolidsProp(IsotropicSolids * obj, double density, double tensileModulus, double shearModulus, double poissonRatio)
{
    if (!obj)return;
    bool ok = obj->setIsotropicSolidsProp(density, tensileModulus, shearModulus, poissonRatio);
    if (!ok) {
        AppFrame::FITKMessageError("Set Isotropic Solids Properties failed !");
    }
}

void MaterialIsotropicSolidsWapper::createMaterial(IsotropicSolids * obj, const QString & name)
{
    if (!obj)return;
    bool ok = obj->createMaterial(name);
    if (!ok) {
        AppFrame::FITKMessageError("Create Isotropic Solids Material failed !");
    }
}

IsotropicSolids::IsotropicSolids(const QString & name):
    Acoustics::PyFITKMaterialsIsotropicSolids(name)
{

}

IsotropicSolids::IsotropicSolids() :
    Acoustics::PyFITKMaterialsIsotropicSolids()
{

}


